﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;

namespace YieldReturnPropertiesApp
{
    public partial class Form1 : Form
    {
        public Form1()
        {
            InitializeComponent();
        }

        public IEnumerable<int> formLayoutPropertyEnumerator()
        {
            yield return textBox1.Left;
            yield return textBox1.Top;
            yield return textBox1.Size.Width;
            yield return textBox1.Size.Height;
            yield break;
        }

        private void textBox1_Resize(object sender, EventArgs e)
        {
            textBox1.Text += "Properties: \r\n";
            foreach (int i in formLayoutPropertyEnumerator())
            {
                textBox1.Text += i.ToString() + "\r\n";
            }
        }
    }
}
